<script setup>
import { ref } from 'vue'
import Login from './components/Login.vue'
import MediaList from './components/MediaList.vue'

const currentView = ref('login')
</script>

<template>
  <div id="app">
    <Login v-if="currentView === 'login'" @login-success="currentView = 'admin'" />
    <MediaList v-else @logout="currentView = 'login'" />
  </div>
</template>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: auto;
}

#app {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: auto;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
</style>
